#include "events_def.h"
#include <string>

std::ostream& MobileCodeReqEv::dump(std::ostream& out)const {
	out << "MobileCodeReq_Sn: " << get_sn()<<".  "
		<< "mobile : " << msg_.mobile() << ".  "
		<<"MobileCodeReqEv eventId: "<< get_eid ( )<< std::endl;
	return out;
}

std::ostream& MobileCodeRspEv::dump(std::ostream& out)const
{
	out << "sn =  " << get_sn() << ". ";
	out << "code = " << msg_.code() << ". ";
	out << "icode = " << msg_.icode() << ". ";
	out << "icode describe: = " << msg_.data() << std::endl;
	return out;
}

std::ostream& LoginReqEv::dump(std::ostream& out)const {
	out << "sn =  " << get_sn() << ". ";
	out << " login mobile :" << msg_.mobile() << " .";
	out << "login mobile code :" << msg_.icode() << " ."<<std::endl;
	return out;
}

std::ostream& LoginRspEv::dump(std::ostream& out) const {
	if ( !msg_.IsInitialized() ) {
		std::cout << "IsInitialized is not succeed" << std::endl;
	}
	out << "sn =  " << get_sn() << ". ";
	out << "login response icode:" << msg_.code() << " .";
	out << "login response icode describe:" << msg_.desc() << std::endl;
}